<?php

namespace common\models\credit_public_tables;

use Yii;

/**
 * This is the model class for table "{{%sl_car_model_qczj}}".
 *
 * @property int $model_id
 * @property int $qczj_model_id
 * @property int $series_id
 * @property string $model_name 具体车型
 * @property string $price 车价
 * @property string $liter 排量
 * @property string $gear_type 手动/自动
 * @property string $model_year
 * @property string $discharge_standard
 * @property string $seat_number
 * @property string $min_reg_year
 * @property string $max_reg_year
 * @property string $url
 */
class SlCarModelQczj extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%sl_car_model_qczj}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_public');
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['qczj_model_id', 'series_id'], 'required'],
            [['qczj_model_id', 'series_id'], 'integer'],
            [['price'], 'number'],
            [['model_name', 'url'], 'string', 'max' => 255],
            [['liter', 'gear_type', 'model_year', 'discharge_standard'], 'string', 'max' => 30],
            [['seat_number'], 'string', 'max' => 50],
            [['min_reg_year', 'max_reg_year'], 'string', 'max' => 20],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'model_id' => Yii::t('app', 'Model ID'),
            'qczj_model_id' => Yii::t('app', 'Qczj Model ID'),
            'series_id' => Yii::t('app', 'Series ID'),
            'model_name' => Yii::t('app', '具体车型'),
            'price' => Yii::t('app', '车价'),
            'liter' => Yii::t('app', '排量'),
            'gear_type' => Yii::t('app', '手动/自动'),
            'model_year' => Yii::t('app', 'Model Year'),
            'discharge_standard' => Yii::t('app', 'Discharge Standard'),
            'seat_number' => Yii::t('app', 'Seat Number'),
            'min_reg_year' => Yii::t('app', 'Min Reg Year'),
            'max_reg_year' => Yii::t('app', 'Max Reg Year'),
            'url' => Yii::t('app', 'Url'),
        ];
    }
}
